from utils.serializer import ModelSerializer
from app.user.models import Permission
from flask_restplus import fields


class PermissionSerializer(ModelSerializer):
    class Meta:
        model = Permission
        fields = ('id', 'name', 'vname', 'desc', 'content', 'action')


class PermissionEasySerializer(ModelSerializer):
    class Meta:
        model = Permission
        fields = ('id', 'content', 'action')
